<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
    <title>选择发票</title>

    <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" title="no title"/>
    <link rel="stylesheet" href="../css/text.css" type="text/css" media="screen" title="no title"/>
    <link rel="stylesheet" href="../css/form.css" type="text/css" media="screen" title="no title"/>
    <link rel="stylesheet" href="../css/buttons.css" type="text/css" media="screen" title="no title"/>
    <link rel="stylesheet" href="../css/grid.css" type="text/css" media="screen" title="no title"/>
    <link rel="stylesheet" href="../css/layout.css" type="text/css" media="screen" title="no title"/>

    <link rel="stylesheet" href="../css/ui-darkness/jquery-ui-1.8.12.custom.css" type="text/css" media="screen"
          title="no title"/>
    <link rel="stylesheet" href="../css/plugin/jquery.visualize.css" type="text/css" media="screen" title="no title"/>
    <link rel="stylesheet" href="../css/plugin/facebox.css" type="text/css" media="screen" title="no title"/>
    <link rel="stylesheet" href="../css/plugin/uniform.default.css" type="text/css" media="screen" title="no title"/>
    <link rel="stylesheet" href="../css/plugin/dataTables.css" type="text/css" media="screen" title="no title"/>
    <link rel="stylesheet" href="../css/custom.css" type="text/css" media="screen" title="no title">
    <style type="text/css">
        .invoice_list a {
            margin: 4px 2px;
            font-size: 14px;
        }
    </style>
    <script src="../js/jquery/jquery-1.5.2.min.js"></script>
    <script type="text/javascript">
        function ok(no) {
            parent.callback(no);
            var mylay = parent.layer.getFrameIndex(window.name);
            parent.layer.close(mylay);
        }
        $(function () {
            $.getJSON("/py-bill/findIvInvoice", {}, function (json) {
                $.each(json.data.list,function(index) {
                    if(index%12==0){
                        $("#fp").append("<br><a href=\"javascript:ok("+this.invoiceNo+");\">"+this.invoiceNo+"</a>")
                    }else{
                        $("#fp").append(" <a href=\"javascript:ok("+this.invoiceNo+");\">"+this.invoiceNo+"</a>")
                    }

                });
            });
        });
    </script>

</head>

<body>

<div style="width:90%; margin:0 auto;">
    <br/>
    <h2>选择发票</h2>


    <div class="invoice_list" id="fp">

    </div>

    <div style="margin-right:20px;">
        <div class="page">
            <a href="javascript:;" @click="pageQuery(1)">第一页</a>
            <a href="javascript:;" @click="pageQuery(page.current-1)" :class=" page.current == 1 ? 'disabled' : ''">上一页</a>
            <input class="pageCount" value="7" v-model="page.current"/> / <input class="pageCount" readonly="readonly"
                                                                                 v-model="page.pages"/>
            <a href="javascript:;" :class=" page.current == page.pages ? 'disabled' : ''" @click="pageQuery(page.current+1)">下一页</a>
            <a href="javascript:;" @click="pageQuery(page.pages-0)">第末页</a>
        </div>
    </div>
</div>

<script src="../js/jquery/jquery-1.5.2.min.js"></script>
<script src="../js/jquery/jquery-ui-1.8.12.custom.min.js"></script>
<script src="../js/misc/excanvas.min.js"></script>
<script src="../js/jquery/facebox.js"></script>
<script src="../js/jquery/jquery.visualize.js"></script>
<script src="../js/jquery/jquery.dataTables.min.js"></script>
<script src="../js/jquery/jquery.tablesorter.min.js"></script>
<script src="../js/jquery/jquery.uniform.min.js"></script>
<script src="../js/jquery/jquery.placeholder.min.js"></script>

<script src="../js/widgets.js"></script>
<script src="../js/dashboard.js"></script>

<script type="text/javascript">

    $(document).ready(function () {
        Dashboard.init();
    });

</script>

</body>

</html>